#!/bin/bash

cd $(dirname $0)

. ./docker/container.sh
# 所有docker可用方法
instance=`grep -h "()" ./docker/*.sh | grep -o "[a-zA-Z0-9_]*"`

echo "\033[36m Docker Container (dece <decezz@qq.com>) \033[0m"
echo "\033[32m ******************************** \033[0m"
echo "\033[35m Pwd    $PWD \033[0m"
echo "\033[35m Home   $HOME \033[0m"
echo "\033[32m ******************************** \033[0m"

echo $instance
read -p "Please input install path :" VOLUME

# 默认安装目录
if [ ! -n "${VOLUME}" ]; then
    VOLUME=$HOME
fi

app () {
    cp -r docker/cmdFunction.sh ~/.cmdFunction
    echo 'source ~/.cmdFunction' >> /etc/bash.bashrc
}

for i in $@
do
    if [ "`echo ${instance} | grep -o "${i}"`" != '' ]; then
        eval "$i"
    fi
done
